/*
 * Use of pointer to set address of variables and print address and values in different ways
 * Use int *j to store address of int type variable to access its values and address instead
 * using variable address directly
 */

#include <stdio.h>

int main()
{
	int i = 3;
	int *j;

	j = &i;

	printf("Address of i = %u\n", &i);
	printf("Address of i = %u\n", j);
	printf("Address of j = %u\n", &j);

	printf("Value of j = %u\n", j);
	printf("Value of i = %d\n", i);
	printf("Value of i = %d\n", *(&i));
	printf("Value of i = %d\n", *j);

	return 0;
}
